package com.enzo.prms.task.model;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.enzo.prms.common.base.to.BaseEntity;

@Entity
@Table(name="T_LIST")
public class Tlist extends BaseEntity {
	private static final long serialVersionUID = -4473209711591209362L;

	@Id
    @GeneratedValue
    @Column(name="ID")
    private Integer id;
	
	@Column(name="LIST_NAME",length=50,nullable=false)
	private String listName;
	
	@OneToMany(mappedBy="list",cascade={CascadeType.PERSIST},fetch=FetchType.LAZY)
	private List<Task> tasks;
	
//	@Transient
//	private int[] delSelections;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getListName() {
		return listName;
	}

	public void setListName(String listName) {
		this.listName = listName;
	}

	public List<Task> getTasks() {
		return tasks;
	}

	public void setTasks(List<Task> tasks) {
		this.tasks = tasks;
	}

//	public int[] getDelSelections() {
//		return delSelections;
//	}
//
//	public void setDelSelections(int[] delSelections) {
//		this.delSelections = delSelections;
//	}

}
